 <?php
include 'conn.php';
$sql = "SELECT * FROM students";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
    while ($row = mysqli_fetch_assoc($result)) {
        echo "ID: " . $row["id"] . " - 姓名: " . $row["realname"] . " - 学号: " . $row["unumber"] . " - 班级: " . $row["class"] . "班- 性别：".($row["gender"]?"男":"女")." - 注册时间：". date("Y-m-d H:m",$row["regtime"])."<br>";
    }
} else {
    echo "没有记录";
}
$conn->close();
?>

